home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group98b.txt
/
000036_icon-group-sender _Tue May 26 12:40:28 1998.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
3KB
Return-Path: <icon-group-sender>
Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
by baskerville.CS.Arizona.EDU (8.8.8/8.8.7) with SMTP id MAA27051
for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Tue, 26 May 1998 12:40:27 -0700 (MST)
Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
id AA06721; Tue, 26 May 1998 12:40:21 -0700
From: F.G.van.Dorp@digimedia.nl (F.G. van DORP)
To: icon-group@optima.CS.Arizona.EDU
Subject: 1-st impressions
Date: Sat, 23 May 1998 12:56:24 GMT
Message-Id: <3568c329.5170584@smtp.NL.net>
X-Mailer: Forte Agent 1.01/16.397
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 8BIT
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
Content-Length: 1764
As the subject says, here are some Icon phenomena which,
after experimenting for a couple of weeks, struck me as interesting,
peculiar, awkward, etc. :
0) Scope restriction inside procedures automatic and no
special syntax for variables (v. PERL e.g.)
1) WHILE - you can't use the "{" without the DO in front.
2) MUTUAL EVAL. - doesn't backtrack, only difference
with the COMPOUND EXPR. seems to be the option
of selecting the outcome expression.
3) INDEXING very consistent (strings, lists, sets, even records)
4) SETS can't be concatenated (no automatic conversion to
lists and back)
5) &FAIL equivalent to NOT &NULL and \&NULL
6) PROC() doesn't work unless the procedure has been called at
least once.
7) can't get RE_FIND (from IPL) to match greedily
8) STRING SCANNING is rather low-level (position-centered)
and so a bit awkward (had to write most high-level functions
myself), same applies to....
9) CO-EXPRESSIONS: powerful (possibilities for declarative
programming, "lazy" evaluation, etc.) but not very intuitive
and (low-level) behavior sometimes puzzling
- at times ^CE or @^CE won't work, while
CE:=^CE seems to do the trick.
- below are 3 expressions in order of evaluation time
(approx. 1x, 4x, 8x)
every write(lazy{z:=(1 to 50000), (5 > z)})
every write(5 > (1 to 50000))
every write( (z:=(1 to 50000),(5 > z)))
procedure lazy(p)
local a,b,c
a:=get(p); b:=get(p)
while (c:=(@a @ ^b)) do {suspend c}
end
-------------------------------------------------------------------------------------------------
Great concise language overall, but generators and especially
co-expressions not easy to get into
Bob.
======